﻿using Allin.Abp.AspNetCore.Components.Server.AntDesignTheme.Themes.AntDesign.Toolbar;
using Allin.Abp.AspNetCore.Components.Web.AntDesignTheme.Toolbars;
using Allin.Abp.AspNetCore.Components.Web.Theming.Toolbars;
using System.Threading.Tasks;

namespace Allin.Abp.AspNetCore.Components.Server.AntDesignTheme.Toolbars;

public class AntDesignThemeBlazorServerToolbarContributor : IToolbarContributor
    {
    public Task ConfigureToolbarAsync(IToolbarConfigurationContext context)
    {
        if (context.Toolbar.Name == AntDesignToolbars.Main)
        {
            context.Toolbar.Items.Add(new ToolbarItem(typeof(UserMenuComponent)));
        }

        return Task.CompletedTask;
    }
}

